package com.pedro.streamer.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;

import com.pedro.streamer.manager.MediaPlayerClient;


public class FloatingView extends ConstraintLayout {

    private Context mContext;


    public FloatingView(Context context) {
        super(context);
        mContext = context;
    }
    public FloatingView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();

        initView();
    }

    private void initView() {
        this.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                MediaPlayerClient.getInstance(mContext).showControlView();
            }
        });
    }
}
